const { defineConfig } = require('@vue/cli-service')

// const NodePolyfillPlugin = require('node-polyfill-webpack-plugin')
const webpack = require('webpack');

module.exports = defineConfig({
  transpileDependencies: true,
  configureWebpack: {
    // watchOptions: {
    //   ignored: /node_modules/,
    // },
    target: 'web',
    resolve: {
      fallback: {
        "fs": false,
        "path": require.resolve("path-browserify"),
        // "assert": false,
        // "os": false,
        process: require.resolve("process/browser")
      }
    },
    plugins: [
      // new NodePolyfillPlugin(),
      new webpack.ProvidePlugin({
        process: 'process/browser',
      }),
    ]
  }
})

// module.exports = {
  // configureWebpack: {
  //   resolve: {
  //     fallback: {
  //       "fs": false,
  //       "path": require.resolve("path-browserify"),
  //     }
  //   }
  // }
// }
